﻿<%@ Page Language="C#" MasterPageFile="~/defaultMaster.master" AutoEventWireup="true" CodeFile="reg.aspx.cs" Inherits="reg" Title="Đăng ký tài khoản" %>

<%@ Register Assembly="RadAjax.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>

<%@ Register Assembly="RadCalendar.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<%@ Register Assembly="RadComboBox.Net2" Namespace="Telerik.WebControls" TagPrefix="rad" %>
<asp:Content ID="Content1" ContentPlaceHolderID="mainContent" Runat="Server">
    <table border="0" cellpadding="0" cellspacing="5" style="width: 650px" align="center">
        <tr>
            <td valign="top">
                <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                    <tr>
                        <td>
                            <table border="0" cellpadding="0" cellspacing="0" style="width: 100%">
                                <tr>
                                    <td style="width: 35px; height: 30px">
                                        <img alt="" src="imgs/header_left.gif" /></td>
                                    <td class="header" style="height: 30px">
                                        <span class="HeaderText">Đăng ký tài khoản người dùng</span></td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                    <tr>
                        <td class="body" valign="top">
                            <table border="0" cellpadding="5" cellspacing="0" style="width: 100%">
                                <tr>
                                    <td class="Verdana3Black" colspan="3">
                                        &nbsp;</td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                    </td>
                                    <td colspan="2">
                                        <asp:Label ID="lblErr" runat="server" CssClass="Verdana8Red" Visible="False" Font-Bold="False"></asp:Label></td>
                                </tr>
                                <tr>
                                    <td colspan="3" style="padding-left: 50px" class="Verdana11Orange">
                                        1. Thông tin cá nhân</td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Họ tên:</td>
                                    <td>
                                        <asp:TextBox ID="txtName" runat="server" CssClass="txt" Width="200px" MaxLength="255"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtName" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Ngày sinh:</td>
                                    <td>
                                        <rad:RadDatePicker ID="rdpBirthday" runat="server" Skin="Vista" Width="200px">
                                            <Calendar Skin="Vista">
                                            </Calendar>
                                            <DateInput Skin="Vista">
                                            </DateInput>
                                        </rad:RadDatePicker>
                                    </td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="rdpBirthday" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        CMND:</td>
                                    <td>
                                        <rad:RadMaskedTextBox ID="txtIdCard" runat="server" Mask="####-#####" Skin="Office2007" Width="200px">
                                        </rad:RadMaskedTextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtIDCard" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Email:</td>
                                    <td>
                                        <asp:TextBox ID="txtEmail" runat="server" CssClass="txt" Width="200px" MaxLength="255"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtEmail"
                                            Display="Dynamic" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator>
                                        <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="txtEmail"
                                            ErrorMessage="Email không hợp lệ" ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" ValidationGroup="Reg"></asp:RegularExpressionValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Địa chỉ:</td>
                                    <td>
                                        <asp:TextBox ID="txtAddress" runat="server" CssClass="txt" MaxLength="255" Width="200px"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator11" runat="server" ControlToValidate="txtAddress"
                                            ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                    </td>
                                    <td>
                                    </td>
                                    <td style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="padding-left: 50px" class="Verdana11Orange">
                                        2. Thông tin đăng nhập</td>
                                    <td class="Verdana11Orange" colspan="1" style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Tên đăng nhập:</td>
                                    <td>
                                        <asp:TextBox ID="txtUID" runat="server" CssClass="txt" Width="200px" MaxLength="50"></asp:TextBox>&nbsp;
                                        <asp:Button ID="btnCheck" runat="server" Text="Check" CssClass="Verdana8Black" OnClick="btnCheck_Click" ValidationGroup="CheckUID" /></td>
                                    <td style="width: 180px" valign="middle">
                                        <rad:RadAjaxPanel id="RadAjaxPanel1" runat="server" Width="100%" HorizontalAlign="NotSet" LoadingPanelID="AjaxLoadingPanel1" ScrollBars="None">
                                            <asp:RequiredFieldValidator id="RequiredFieldValidator5" runat="server" ErrorMessage="(*)" ControlToValidate="txtUID" Display="Dynamic"></asp:RequiredFieldValidator>
                                            <asp:Label ID="lblUIDErr" runat="server" CssClass="Verdana8Red" Visible="False"></asp:Label></rad:RadAjaxPanel>
                                        </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Mật khẩu:</td>
                                    <td>
                                        <asp:TextBox ID="txtPWD" runat="server" CssClass="txt" TextMode="Password" Width="200px" MaxLength="255"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="txtPWD" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Nhập lại mật khẩu:</td>
                                    <td>
                                        <asp:TextBox ID="txtPWD2" runat="server" CssClass="txt" TextMode="Password" Width="200px" MaxLength="255"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="txtPWD2"
                                            Display="Dynamic" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator>
                                        <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="txtPWD"
                                            ControlToValidate="txtPWD2" ErrorMessage="Mật khẩu chưa khớp" ValidationGroup="Reg"></asp:CompareValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                    </td>
                                    <td>
                                    </td>
                                    <td style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td colspan="2" style="padding-left: 50px" class="Verdana11Orange">
                                        3. Thông tin tài khoản</td>
                                    <td class="Verdana11Orange" colspan="1" style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Chủ thẻ:</td>
                                    <td>
                                        <asp:TextBox ID="txtCardOwner" runat="server" CssClass="txt" Width="200px" MaxLength="255"></asp:TextBox></td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtCardOwner" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Loại thẻ:</td>
                                    <td>
                                        <asp:RadioButton ID="rbMaster" runat="server" Checked="True" GroupName="TypeSelection"
                                            Text="Master" />
                                        <asp:RadioButton ID="rbVisa" runat="server" GroupName="TypeSelection" Text="Visa" /></td>
                                    <td style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Mã thẻ:</td>
                                    <td>
                                        <rad:RadMaskedTextBox ID="txtCardNo" runat="server" Mask="####-####-####-####" Skin="Office2007" Width="200px">
                                        </rad:RadMaskedTextBox>
                                        <asp:Button ID="btnCheckCard" runat="server" Text="Check" CssClass="Verdana8Black" OnClick="btnCheckCard_Click" ValidationGroup="CheckCardNo"/></td>
                                    <td style="width: 180px" valign="middle">
                                        <rad:RadAjaxPanel ID="RadAjaxPanel2" runat="server" Width="100%">
                                            <asp:RequiredFieldValidator id="RequiredFieldValidator9" runat="server" ErrorMessage="(*)" ControlToValidate="txtCardNo" Display="Dynamic"></asp:RequiredFieldValidator>
                                            <asp:Label ID="lblCardErr" runat="server" CssClass="Verdana8Red" Visible="False"></asp:Label></rad:RadAjaxPanel>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                        Ngày hết hạn:</td>
                                    <td>
                                        <rad:RadDatePicker ID="rpdExpiredDate" runat="server" Skin="Vista" Width="200px">
                                            <Calendar Skin="Vista">
                                            </Calendar>
                                            <DateInput Skin="Vista">
                                            </DateInput>
                                        </rad:RadDatePicker>
                                    </td>
                                    <td style="width: 180px">
                                        <asp:RequiredFieldValidator ID="RequiredFieldValidator10" runat="server" ControlToValidate="rpdExpiredDate" ErrorMessage="(*)" ValidationGroup="Reg"></asp:RequiredFieldValidator></td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                    </td>
                                    <td>
                                    </td>
                                    <td style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" style="width: 25%">
                                    </td>
                                    <td>
                                        <asp:Button ID="btnReg" runat="server" CssClass="coolButton" Text="Đăng ký" OnClick="btnReg_Click" ValidationGroup="Reg" /></td>
                                    <td style="width: 180px">
                                    </td>
                                </tr>
                                <tr>
                                    <td class="Verdana3Black" colspan="3">
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>
    <rad:RadAjaxManager id="RadAjaxManager1" runat="server" DefaultLoadingPanelID="AjaxLoadingPanel1">
        <ajaxsettings>
            <rad:AjaxSetting AjaxControlID="btnCheck">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="RadAjaxPanel1" />
                </UpdatedControls>
            </rad:AjaxSetting>
            <rad:AjaxSetting AjaxControlID="btnCheckCard">
                <UpdatedControls>
                    <rad:AjaxUpdatedControl ControlID="RadAjaxPanel2" />
                </UpdatedControls>
            </rad:AjaxSetting>
        </ajaxsettings>
    </rad:RadAjaxManager>
    <rad:AjaxLoadingPanel ID="AjaxLoadingPanel1" runat="server" Height="75px" Width="75px">
        <asp:Image ID="Image1" runat="server" AlternateText="Loading..." ImageUrl="~/imgs/ajaxLoading.gif" />
    </rad:AjaxLoadingPanel>
</asp:Content>

